import request from '@/utils/request'

export function list(data) {
    data.json  = true
    let url = '/shop/param/list'
    return request.post(url,data)
}

export function all() {
    let url = '/shop/param/all'
    return request.get(url)
}

export function down(data) {
    data.json  = true
    let config = {
        responseType: 'arraybuffer',
    }
    let url =  '/shop/param/down'
    return request.post(url,data,config)
}

export function info(id) {
    let url = '/shop/param/info/' + id
    return request.get(url)
}

export function save(data) {
    data.json = true
    let url = '/shop/param/save'
    return request.post(url,data)
}

export function update(data) {
    data.json = true
    let url = '/shop/param/update'
    return request.post(url,data)
}

export function remove(data) {
    let url =  '/shop/param/delete'
    return request.post(url,data)
}

export function options() {
    let url =  '/shop/param/dmz/options'
    return request.get(url)
}
export function updateMaterialPrice(materialPrice) {
    return request({
        url: '/shop/param/updateMaterialPrice/' + materialPrice,
        method: 'get'
    })
}
export function findShop(query) {
    return request({
        url: '/shop/list',
        method: 'get',
        params: query
    })
}
